ABC174 B - Distance